Auto merge of #4000 - jonhoo:only-incremental-on-nightly, r=alexcrichton
authorbors <bors@rust-lang.org>
Sun, 7 May 2017 16:24:48 +0000 (16:24 +0000)
committerbors <bors@rust-lang.org>
Sun, 7 May 2017 16:24:48 +0000 (16:24 +0000)
commit216db852555fcadecb363aabe2c74e13dcd0ed9b
treeba07a0fec1de0cf9df2d7902fd353332d4c53098
parent20a085e2636a0bcfbea6b27d80784fef9758f37a
parent357bb2def6bb2530cce5df6afdebef52c8354566
Auto merge of #4000 - jonhoo:only-incremental-on-nightly, r=alexcrichton

Only pass -Zincremental to nightly rustc.

`-Z` can only be used on nightly builds; other builds complain loudly. Since incremental builds only work on nightly anyway, we should silently ignore `CARGO_INCREMENTAL` on anything but nightly. This allows users to always have `CARGO_INCREMENTAL` set without getting unexpected errors on stable/beta builds.

Fixes #3835.